package com.icoopoo.common.base.icoopoo.listener;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * @Auther: icoopoo@163.com
 * @Date: 2018/4/26 0026
 * @Description:
 */
public class ServerListener implements ServletContextListener {

    protected final Logger logger = LogManager.getLogger(this.getClass());

    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        System.out.println("=============icoopoo");
        System.out.println("=============icoopoo");
        System.out.println("=============icoopoo");
        System.out.println("=============icoopoo");
        logger.info("=================================");
        logger.info("系统[{}]启动完成!!!", servletContextEvent.getServletContext().getServletContextName());
        logger.info("=================================");
        System.out.println("=============icoopoo");
        System.out.println("=============icoopoo");
        System.out.println("=============icoopoo");
        System.out.println("=============icoopoo");
    }

    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {

    }
}
